<html>
<head><meta charset="utf-8"><title>UI test failing with link error locally but not in CI · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/UI.20test.20failing.20with.20link.20error.20locally.20but.20not.20in.20CI.html">UI test failing with link error locally but not in CI</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="243563789"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/UI%20test%20failing%20with%20link%20error%20locally%20but%20not%20in%20CI/near/243563789" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/UI.20test.20failing.20with.20link.20error.20locally.20but.20not.20in.20CI.html#243563789">(Jun 22 2021 at 19:02)</a>:</h4>
<p>It appears that the <code>ui\abi\stack-probes-lto.rs</code> test fails on Windows currently on my local machine from a fresh clone of the Rust repo but passes in CI. I've tried using using <code>./configure &amp;&amp; make ci-subset-2</code> like the GH Actions yaml configuration does but I still see a failure locally. Does anyone have any idea what could be causing this discrepancy? </p>
<p>To summarize:</p>
<div class="codehilite" data-code-language="PowerShell"><pre><span></span><code><span class="n">git</span> <span class="n">clone</span> <span class="n">https</span><span class="p">://</span><span class="n">github</span><span class="p">.</span><span class="n">com</span><span class="p">/</span><span class="n">rust-lang</span><span class="p">/</span><span class="n">rust</span><span class="p">.</span><span class="n">git</span>
<span class="nb">cd </span><span class="n">rust</span>
<span class="s2">"changelog-seen = 2</span><span class="se">`r`n</span><span class="s2">[llvm]</span><span class="se">`r`n</span><span class="s2">download-ci-llvm = true"</span> <span class="p">|</span> <span class="nb">Out-File</span> <span class="n">config</span><span class="p">.</span><span class="n">toml</span> <span class="n">-Encoding</span> <span class="n">UTF8</span>
<span class="n">python</span> <span class="n">x</span><span class="p">.</span><span class="n">py</span> <span class="n">test</span> <span class="n">src</span><span class="p">/</span><span class="n">test</span><span class="p">/</span><span class="n">ui</span><span class="p">/</span><span class="n">abi</span><span class="p">/</span>
</code></pre></div>
<p>yields</p>
<div class="codehilite"><pre><span></span><code>running 162 tests
i...........i.................i....................iii.............................................. 100/162
.............................................................F
failures:

---- [ui] ui\abi\stack-probes-lto.rs stdout ----

error: test compilation failed although it shouldn&#39;t!
status: exit code: 1
command: PATH=&quot;D:\code\rust5\build\x86_64-pc-windows-msvc\stage1\bin;C:\Program Files (x86)\Windows Kits\10\bin\x64;C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64;C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.29.30034\bin\HostX64\x64;C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.29.30034\bin\HostX64\x64;D:\code\rust5\build\x86_64-pc-windows-msvc\stage0-bootstrap-tools\x86_64-pc-windows-msvc\release\deps;D:\code\rust5\build\x86_64-pc-windows-msvc\stage0\bin;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NGX;c:\Program Files (x86)\HP\HP Performance Advisor;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Git\cmd;D:\bin;C:\Program Files\CMake\bin;C:\Program Files (x86)\Vim\vim82;&quot; &quot;D:\\code\\rust5\\build\\x86_64-pc-windows-msvc\\stage1\\bin\\rustc.exe&quot; &quot;D:\\code\\rust5\\src/test\\ui\\abi\\stack-probes-lto.rs&quot; &quot;-Zthreads=1&quot; &quot;--target=x86_64-pc-windows-msvc&quot; &quot;--error-format&quot; &quot;json&quot; &quot;-Ccodegen-units=1&quot; &quot;-Zui-testing&quot; &quot;-Zdeduplicate-diagnostics=no&quot; &quot;-Zemit-future-incompat-report&quot; &quot;-o&quot; &quot;D:\\code\\rust5\\build\\x86_64-pc-windows-msvc\\test\\ui\\abi\\stack-probes-lto\\a.exe&quot; &quot;-Crpath&quot; &quot;-O&quot; &quot;-Cdebuginfo=0&quot; &quot;-Lnative=D:\\code\\rust5\\build\\x86_64-pc-windows-msvc\\native\\rust-test-helpers&quot; &quot;-C&quot; &quot;lto&quot; &quot;-L&quot; &quot;D:\\code\\rust5\\build\\x86_64-pc-windows-msvc\\test\\ui\\abi\\stack-probes-lto\\auxiliary&quot;
stdout:
------------------------------------------

------------------------------------------
stderr:
------------------------------------------
error: linking with `link.exe` failed: exit code: 1120
   |
   = note: &quot;C:\\Program Files\\Microsoft Visual Studio\\2022\\Preview\\VC\\Tools\\MSVC\\14.29.30034\\bin\\HostX64\\x64\\link.exe&quot; &quot;/NOLOGO&quot; &quot;D:\\code\\rust5\\build\\x86_64-pc-windows-msvc\\test\\ui\\abi\\stack-probes-lto\\a.stack_probes_lto.7rcbfp3g-cgu.0.rcgu.o&quot; &quot;/LIBPATH:D:\\code\\rust5\\build\\x86_64-pc-windows-msvc\\native\\rust-test-helpers&quot; &quot;/LIBPATH:D:\\code\\rust5\\build\\x86_64-pc-windows-msvc\\test\\ui\\abi\\stack-probes-lto\\auxiliary&quot; &quot;/LIBPATH:D:\\code\\rust5\\build\\x86_64-pc-windows-msvc\\stage1\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib&quot; &quot;/WHOLEARCHIVE:rust_test_helpers.lib&quot; &quot;D:\\code\\rust5\\build\\x86_64-pc-windows-msvc\\stage1\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcompiler_builtins-3959179ffa4eca4c.rlib&quot; &quot;kernel32.lib&quot; &quot;ws2_32.lib&quot; &quot;advapi32.lib&quot; &quot;userenv.lib&quot; &quot;kernel32.lib&quot; &quot;msvcrt.lib&quot; &quot;/NXCOMPAT&quot; &quot;/LIBPATH:D:\\code\\rust5\\build\\x86_64-pc-windows-msvc\\stage1\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib&quot; &quot;/OUT:D:\\code\\rust5\\build\\x86_64-pc-windows-msvc\\test\\ui\\abi\\stack-probes-lto\\a.exe&quot; &quot;/OPT:REF,ICF&quot; &quot;/DEBUG&quot;
   = note: a.stack_probes_lto.7rcbfp3g-cgu.0.rcgu.o : error LNK2001: unresolved external symbol __rust_panic_type_info
           D:\code\rust5\build\x86_64-pc-windows-msvc\test\ui\abi\stack-probes-lto\a.exe : fatal error LNK1120: 1 unresolved externals


error: aborting due to previous error


------------------------------------------



failures:
    [ui] ui\abi\stack-probes-lto.rs

test result: FAILED. 155 passed; 1 failed; 6 ignored; 0 measured; 11847 filtered out; finished in 4.98s

Some tests failed in compiletest suite=ui mode=ui host=x86_64-pc-windows-msvc target=x86_64-pc-windows-msvc
</code></pre></div>
<p>but CI passes.</p>



<a name="243564368"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/UI%20test%20failing%20with%20link%20error%20locally%20but%20not%20in%20CI/near/243564368" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/UI.20test.20failing.20with.20link.20error.20locally.20but.20not.20in.20CI.html#243564368">(Jun 22 2021 at 19:06)</a>:</h4>
<p>There’s no way this is a stage 1 vs stage 2 thing, right?</p>



<a name="243564425"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/UI%20test%20failing%20with%20link%20error%20locally%20but%20not%20in%20CI/near/243564425" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/UI.20test.20failing.20with.20link.20error.20locally.20but.20not.20in.20CI.html#243564425">(Jun 22 2021 at 19:07)</a>:</h4>
<p>(I’m just thinking of my recent pains where <code>x.py test</code> defaults to stage 1 but CI solely tests stage 2.)</p>



<a name="243565142"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/UI%20test%20failing%20with%20link%20error%20locally%20but%20not%20in%20CI/near/243565142" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/UI.20test.20failing.20with.20link.20error.20locally.20but.20not.20in.20CI.html#243565142">(Jun 22 2021 at 19:12)</a>:</h4>
<p>Yeah, I had that thought after seeing your thread but using <code>--stage 1</code> or <code>--stage 2</code> makes no difference. They both result in the error.</p>



<a name="243566875"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/UI%20test%20failing%20with%20link%20error%20locally%20but%20not%20in%20CI/near/243566875" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/UI.20test.20failing.20with.20link.20error.20locally.20but.20not.20in.20CI.html#243566875">(Jun 22 2021 at 19:26)</a>:</h4>
<p>I've also tried <code> ./configure --build=x86_64-pc-windows-msvc --enable-profiler &amp;&amp; make ci-subset-2</code> which I think is basically what CI does and it fails as well.</p>



<a name="243566948"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/UI%20test%20failing%20with%20link%20error%20locally%20but%20not%20in%20CI/near/243566948" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/UI.20test.20failing.20with.20link.20error.20locally.20but.20not.20in.20CI.html#243566948">(Jun 22 2021 at 19:27)</a>:</h4>
<p>hm</p>



<a name="243566997"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/UI%20test%20failing%20with%20link%20error%20locally%20but%20not%20in%20CI/near/243566997" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/UI.20test.20failing.20with.20link.20error.20locally.20but.20not.20in.20CI.html#243566997">(Jun 22 2021 at 19:27)</a>:</h4>
<p>our windows builds don't run in docker or anything (I think because there's not really a containerization solution for windows? not sure)</p>



<a name="243567528"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/UI%20test%20failing%20with%20link%20error%20locally%20but%20not%20in%20CI/near/243567528" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/UI.20test.20failing.20with.20link.20error.20locally.20but.20not.20in.20CI.html#243567528">(Jun 22 2021 at 19:31)</a>:</h4>
<p>but we have a bunch more cfg's in CI I think than just ./configure?</p>



<a name="243567617"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/UI%20test%20failing%20with%20link%20error%20locally%20but%20not%20in%20CI/near/243567617" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/UI.20test.20failing.20with.20link.20error.20locally.20but.20not.20in.20CI.html#243567617">(Jun 22 2021 at 19:32)</a>:</h4>
<p><span class="user-mention" data-user-id="125250">@Wesley Wiser</span> e.g., --set rust.codegen-units-std=1</p>



<a name="243567636"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/UI%20test%20failing%20with%20link%20error%20locally%20but%20not%20in%20CI/near/243567636" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/UI.20test.20failing.20with.20link.20error.20locally.20but.20not.20in.20CI.html#243567636">(Jun 22 2021 at 19:32)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/blob/75ed34223adb02c7bbfa5ae5e62c48952ff29914/src/ci/run.sh">https://github.com/rust-lang/rust/blob/75ed34223adb02c7bbfa5ae5e62c48952ff29914/src/ci/run.sh</a> is run on the windows builders too</p>



<a name="243567712"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/UI%20test%20failing%20with%20link%20error%20locally%20but%20not%20in%20CI/near/243567712" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/UI.20test.20failing.20with.20link.20error.20locally.20but.20not.20in.20CI.html#243567712">(Jun 22 2021 at 19:33)</a>:</h4>
<p>my guess is if codegen units can cause this then playing with how many cgus std uses can affect it too</p>



<a name="243574105"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/UI%20test%20failing%20with%20link%20error%20locally%20but%20not%20in%20CI/near/243574105" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/UI.20test.20failing.20with.20link.20error.20locally.20but.20not.20in.20CI.html#243574105">(Jun 22 2021 at 20:25)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> Yep, that was it. <code>rust.codegen-units-std=1</code> causes the test to pass.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>